import requests
from config import BASE_URL


def get_headers(mobile="13800000002", password="123456"):
    url = f"{BASE_URL}/api/sys/login"
    body = {
        "mobile": mobile,
        "password": password
    }
    resp = requests.post(url=url, json=body)
    token = "Bearer " + resp.json().get("data")
    headers = {
        "Content-Type": "application/json",
        "Authorization": token
    }
    return headers


